package com.fortune.rainshinecommon.enums;

public enum CardTypeEnum {
    TIMES(1,"次数卡"),RECHARGE(2,"充值卡");

    private int key;
    private String value;

    CardTypeEnum(int key, String value){
        this.key = key;
        this.value = value;
    }

    public int getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getValue(int key){
        for(CardTypeEnum cardTypeEnum : CardTypeEnum.values()){
            if(key == cardTypeEnum.getKey()){
                return cardTypeEnum.value;
            }
        }
        return null;
    }
}
